home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 46
/
Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso
/
-in_the_mag-
/
reader_requests
/
scilab
/
demos
/
signal
/
winfilt.dem
< prev
Wrap
Text File
|
1999-09-16
|
1KB
|
32 lines
////////////////////////
//WINDOWED FIR FILTERS//
////////////////////////
//Low pass filter (length 33, Kaiser window, cut-off .2)
[wft,wfm,fr]=wfir('lp',33,[.2 0],'kr',[5.6 0]);
plot2d(fr',log(wfm)')
xtitle(' ','frequency','magnitude');
xtitle(['Windowed FIR Low pass Filter';...
'Kaiser window,cut-off:0.2';...
'length 33'])
halt();
xbasc();
//Stop band filter (length 127, Hamming window, cut-offs .2 and .3)
[wft,wfm,fr]=wfir('sb',127,[.2 .3],'hm',[0 0]);
plot2d(fr',log(wfm)')
xtitle(' ','frequency','magnitude')
xtitle(['Windowed FIR Low pass Filter';...
'Hamming window,cut-off:0.2,0.3';...
'length 127'])
xbasc();
//Band pass filter (length 55, Chebyshev window, cut-offs .15 and .35)
[wft,wfm,fr]=wfir('bp',55,[.15 .35],'ch',[.001 -1]);
plot2d(fr',log(wfm)')
xtitle(' ','frequency','magnitude')
xtitle(['Windowed FIR Band pass Filter';...
'Chebyshev window,cut-off:0.15,0.35';...
'length 55'])
xbasc();